package com.bysc.commonutils.enums;


public enum CommentEnum {
    //帖子
    POST(0),
    //评论
    PARENT(1),
    //子评论
    SON(2),
    //学习资料
    STUDYMATERIAL(3);

    private final int value;

    CommentEnum(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static CommentEnum getByValue(int value) {
        for (CommentEnum type : values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        throw new IllegalArgumentException("Invalid CommentType value: " + value);
    }
}

